/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.src.ptit.javatraining.huynh.btvn1;

import java.util.Scanner;

/**
 *
 * @author user
 */
public class Baitap3 {

    static void pt(long a) {
        long k = (long) Math.sqrt(a);
        System.out.print(a + " = ");
        while (a != 1) {
            for (long i = 2; i <= a; i++) {
                if (a % i == 0) {
                    if (a != i) {
                        System.out.print(i + " x ");
                    } else {
                        System.out.println(i);
                    }
                    a /= i;
                    while (a % i == 0) {
                        if (a != i) {
                            System.out.print(i + " x ");
                        } else {
                            System.out.println(i);
                        }
                        a /= i;
                    }
                }
            }

        }
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n;
        try {
            n = sc.nextLong();
            pt(n);
        } catch (Exception e) {
            System.out.println("Moi nhap lai !");
        }
    }
}
